package ui.provider;

import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.graphics.Image;

import dao.EgnProduct;

public class ProductLabel extends LabelProvider implements ITableLabelProvider {

	@Override
	public Image getColumnImage(Object element, int columnIndex) {
		return null;
	}

	@Override
	public String getColumnText(Object element, int columnIndex) {
		EgnProduct prod = (EgnProduct) element;
		switch (columnIndex) {
		case 0:
			return prod.getProductId();
		case 1:
			return prod.getProductType();
		case 2:
		case 3:
		default:
			throw new RuntimeException("Should not happen");
		}
	}

}
